home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 96000tar.z / 96000tar / 96000 / appb / b114.asm < prev    next >
Assembly Source File  |  1992-04-28  |  4KB  |  68 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.14    N Cascaded Real Biquad IIR Filters  
  8. ;   w(n) = x(n) - a1 * w(n-1) - a2 * w(n-2) 
  9. ;   y(n) = w(n) + b1 * w(n-1) + b2 * w(n-2) 
  10. ;       X Memory Organization            Y Memory Organization 
  11. ;                                                      b1N     Coef. + 4N-1 
  12. ;                                                      b2N     
  13. ;                                                      a1N     
  14. ;                                                      a2N     
  15. ;           wN(n-1)   Data + 2N-1                      .      
  16. ;           wN(n-2)                                     .      
  17. ;             .                                        b11     
  18. ;             .                                        b21     
  19. ;           w1(n-1)                                    a11   
  20. ;     R1,R0 ?  w1(n-2)   Data                    R4 ?    a21     Coef. 
  21. ;                                                          
  22. ;
  23. ;                      DSP56000 IMPLEMENTATION 
  24. ;                                                           Program    ICycles 
  25. ;                                                           Words 
  26. ;       move  #$ffffffff,m0                                   2          2 
  27. ;       move  m0,m4                                           1          1 
  28. ;       move  #data,r0                                        2          2 
  29. ;       move  #coef,r4                                        2          2 
  30. ;       movep              x:input,a                          1          2 
  31. ;       move               x:(r0)+,x0    y:(r4)+,y0           1          1 
  32. ;       do     #n,end                                         2          3 
  33. ;       mac    -x0,y0,a    x:(r0)-,x1    y:(r4)+,y0           1          1 
  34. ;       macr   -x1,y0,a    x1,x:(r0)+    y:(r4)+,y0           1          1 
  35. ;       mac    x0,y0,a     a,x:(r0)+     y:(r4)+,y0           1          1 
  36. ;       mac    x1,y0,a     x:(r0)+,x0    y:(r4)+,y0           1          1 
  37. ;end 
  38. ;       rnd    a                                              1          1 
  39. ;       movep              a,x:output                         1          2 
  40. ;                                                 ------------------- 
  41. ;                                                      Totals 17       4N+16 
  42. ;                      DSP96002 IMPLEMENTATION 
  43.                                                              Program    ICycles
  44.                                                                     Words 
  45.        move   #$ffffffff,m0                                  ; 2     2 
  46.        move   m0,m4                                          ; 1     1 
  47.        move   m0,m1                                          ; 1     1 
  48.        move   #data,r0                                       ; 2     2 
  49.        move   r0,r1                                          ; 1     1 
  50.        move   #coef,r4                                       ; 2     2 
  51.        movep                       x:input,d0.s              ; 1     2 
  52.        fclr   d1                   x:(r0)+,d4.s y:(r4)+,d6.s ; 1     1 
  53.        do     #n,end                                         ; 2     3 
  54.        fmpy d4,d6,d1 fadd.s d1,d0  x:(r0)+,d5.s y:(r4)+,d6.s ; 1     1 
  55.        fmpy d5,d6,d1 fsub.s d1,d0  d5.s,x:(r1)+ y:(r4)+,d6.s ; 1     1 
  56.        fmpy d4,d6,d1 fsub.s d1,d0  x:(r0)+,d4.s y:(r4)+,d6.s ; 1     1 
  57.        fmpy d5,d6,d1 fadd.s d1,d0  d0.s,x:(r1)+ y:(r4)+,d6.s ; 1     1 
  58. end; 
  59.                      fadd.s d1,d0                            ; 1     1 
  60.        movep                       d0.s,x:output             ; 1     2 
  61. ;                                                            ; ---   --- 
  62. ;                                                     Totals:     19   4N+18 
  63. ;                                                            (17   4N+16) 
  64.  
  65.